package com.yumei.trader.gym.page;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;

import com.yumei.trader.gym.R;
import com.yumei.trader.gym.client.BasePage;
import com.yumei.trader.gym.client.TGApplication;
import com.yumei.trader.gym.dbase.sqlite.SqliteActObject;


public class PagePpResetAssets extends BasePage {

    private TGApplication mApp;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mApp = (TGApplication) this.getApplication();

        setContentView(R.layout.pop_reset_assets);

        registerComponent();
        transparentBar();
    }

    @Override
    protected void onResume() {
        super.onResume();

        //界面全屏，隐藏导航栏
        hideBottomNav(PagePpResetAssets.this);
    }

    @SuppressLint({"SetTextI18n", "DefaultLocale"})
    private void registerComponent() {

        this.findViewById(R.id.btn_ok).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackAction();
            }
        });

        this.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                SqliteActObject.getInstance(PagePpResetAssets.this).setAccount(mApp.getUserId(), 100000);
                onBackAction();
            }
        });
    }
}
